﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Orchard_Users_UserPartRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Orchard_Users_UserPartRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Orchard_Users_UserPartRecord() : base("Orchard_Users_UserPartRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _UserName = "UserName";
        public RaisingStudio.Data.Expressions.ColumnExpression UserName { get { return _UserName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Email = "Email";
        public RaisingStudio.Data.Expressions.ColumnExpression Email { get { return _Email; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _NormalizedUserName = "NormalizedUserName";
        public RaisingStudio.Data.Expressions.ColumnExpression NormalizedUserName { get { return _NormalizedUserName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Password = "Password";
        public RaisingStudio.Data.Expressions.ColumnExpression Password { get { return _Password; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PasswordFormat = "PasswordFormat";
        public RaisingStudio.Data.Expressions.ColumnExpression PasswordFormat { get { return _PasswordFormat; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _HashAlgorithm = "HashAlgorithm";
        public RaisingStudio.Data.Expressions.ColumnExpression HashAlgorithm { get { return _HashAlgorithm; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _PasswordSalt = "PasswordSalt";
        public RaisingStudio.Data.Expressions.ColumnExpression PasswordSalt { get { return _PasswordSalt; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _RegistrationStatus = "RegistrationStatus";
        public RaisingStudio.Data.Expressions.ColumnExpression RegistrationStatus { get { return _RegistrationStatus; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _EmailStatus = "EmailStatus";
        public RaisingStudio.Data.Expressions.ColumnExpression EmailStatus { get { return _EmailStatus; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _EmailChallengeToken = "EmailChallengeToken";
        public RaisingStudio.Data.Expressions.ColumnExpression EmailChallengeToken { get { return _EmailChallengeToken; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Orchard_Users_UserPartRecord Orchard_Users_UserPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Orchard_Users_UserPartRecord Orchard_Users_UserPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Orchard_Users_UserPartRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Orchard_Users_UserPartRecord Orchard_Users_UserPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Orchard_Users_UserPartRecord.Id,
                            Orchard_Users_UserPartRecord.UserName,
                            Orchard_Users_UserPartRecord.Email,
                            Orchard_Users_UserPartRecord.NormalizedUserName,
                            Orchard_Users_UserPartRecord.Password,
                            Orchard_Users_UserPartRecord.PasswordFormat,
                            Orchard_Users_UserPartRecord.HashAlgorithm,
                            Orchard_Users_UserPartRecord.PasswordSalt,
                            Orchard_Users_UserPartRecord.RegistrationStatus,
                            Orchard_Users_UserPartRecord.EmailStatus,
                            Orchard_Users_UserPartRecord.EmailChallengeToken,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Orchard_Users_UserPartRecord>(_Orchard_Users_UserPartRecord Orchard_Users_UserPartRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Orchard_Users_UserPartRecord>(Orchard_Users_UserPartRecord);
        }


        #region IQueryExpression<_Orchard_Users_UserPartRecord> 成员

        _Orchard_Users_UserPartRecord RaisingStudio.Data.Expressions.IQueryExpression<_Orchard_Users_UserPartRecord>.Value
        {
            get { return Orchard_Users_UserPartRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Orchard_Users_UserPartRecord
    {
        #region Members
        public static readonly _Orchard_Users_UserPartRecord _ = new _Orchard_Users_UserPartRecord();
		#endregion
    }
}
